core: Do create hardlinks to symlinks for checkouts
authorColin Walters <walters@verbum.org>
Tue, 4 Oct 2016 19:23:04 +0000 (15:23 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 17 Oct 2016 20:40:15 +0000 (20:40 +0000)
commit1d4f1b8878addd28059c3a3928640491755cd615
treefc35118c88c7cf18bec8532c3bd7a3889e1df529
parenta660e5650d0f460810ea75c44d044b6924659f59
core: Do create hardlinks to symlinks for checkouts

I was noticing a recent performance issue with checkouts
which seemed to be mostly us going back to doing a `fsync()` on
directories.

Regardless, while looking at that, I saw we were spending time
creating new symlinks. Even though symlinks are small, it's still
better to hardlink them.

Going way back in time, the reason we weren't doing this is
because we were hitting `EMFILE` on ext4, but that was for
gnome-continuous which creates *many* build roots.  Even
there though, they're just a cache, and we handle `EMFILE`.

For ostree-for-host-system, we don't expect to have many roots (just 3
at most transiently), so hardlinking symlinks does make sense.

Closes: #521
Approved by: jlebon
src/libostree/ostree-repo-checkout.c